#ifndef PROGRESSBARDELEGATE_H
#define PROGRESSBARDELEGATE_H
#include <QObject>
#include <QItemDelegate>
#include <QWidget>
#include <QSqlRelationalDelegate>
#include "mainwindow.h"

class Delegate : public QSqlRelationalDelegate
{
    Q_OBJECT
    DownloadTableModel * model;
public:
    Delegate(DownloadTableModel *mainWindow);
    virtual void paint(QPainter *painter,
               const QStyleOptionViewItem &option,
               const QModelIndex &index) const;
    virtual QWidget * createEditor ( QWidget * parent, const QStyleOptionViewItem & option, const QModelIndex & index ) const;
};

#endif // PROGRESSBARDELEGATE_H
